package com.company;

public class privata {
public static void main(String[] args){
    Student s= new Student();
    s.setAge(25);
    s.setName("南瓜");
    s.setSex("男");
    s.look();

    System.out.println(s.getAge());
    System.out.println(s.getName());
    System.out.println(s.getSex());
}
}
class  Student{
    private int  age;

    public void setAge(int x) {
        age = x;
    }

    public int getAge() {
        return age;
    }

    private String name;

    public void setName(String x) {
        name = x;
    }

    public String getName() {
        return name;
    }

    private String sex;

    public void setSex(String x) {
        sex = x;
    }

    public String getSex() {
        return sex;
    }

    private void study(){
         System.out.println("学习..");
     }
     private void eat(){
         System.out.println("吃饭。。");

     }
     public  void look(){
         eat();
         study();
     }
}